#include <REGX52.H>

sbit LED=P2^0;

void Delay(unsigned int t)
{
	while(t--);
}
void main()
{
	unsigned char Timer;
	unsigned char i;
	while(1)
	{
		for(Timer=0;Timer<100;Timer++)
		{
			for(i=0;i<20;i++)
			{
				LED = 0;
				Delay(Timer);
				LED = 1;
				Delay(100-Timer);
			}
		}
		for(Timer=100;Timer>0;Timer--)
		{
			for(i=0;i<20;i++)
			{
				LED = 0;
				Delay(Timer);
				LED = 1;
				Delay(100-Timer);
			}
		}
	}
}